const koa = require("koa");
// const cors = require("koa2-cors");                   //config/init.js
// const router = require("koa-router")();              //router/index.js，
const app = new koa();
// const render = require('koa-art-template');          //config/init.js
/* const {resolve} = require('path'); */
// const bodyParser = require("koa-bodyparser");            //config/init.js

/* render(app,{
    root:resolve(__dirname,'views'),
    extname:'.html',//后缀也可以写成.art
    debug:process.env.NODE_ENV !== 'production'
}); */                                                  //config/init.js
const initManage = require("./config/init.js")
initManage(app)
/* router.get('/',async ctx=>{
    await ctx.render("index")
}) */                               //router/index.js
//启动路由
/* app.use(router.routes());        //config/init.js
app.use(cors());
app.use(bodyParser()); */
app.listen(8080)
